<?php

/**
 * @author shuang
 * @date 2016-11-16 8:25:14
 */
use yii\helpers\Url;
use common\widgets\DatalistWidgets;
use common\components\MTools;

$labels = \yii\helpers\ArrayHelper::merge($labels, [
            "auditstatus" => "审核状态",
            "username" => "被投诉刷手账号"
        ]);
//添加操作提示模板
echo $this->render("/layouts/prompt", array("labels" => $labels));

//调用数据列表模板
echo DatalistWidgets::widget([
    'data_url' => Url::toRoute(["task/ajaxuntreatedappeal"]),
    "labels" => $labels,
    "columns" => ["mid", "taskid", "title", "username","task_image", "sample_figure", "appeal_task_image", "auditstatus", "complain_at", "complain_audit_at", "complain_note", "appeal_at", "appeal_audit_at", "action"],
    "tableOtherAttributes" => [
        "data-search" => "true",
        "data-search-align" => "right",
        "data-click-to-select" => "true"
    ],
    "toolbar" => "#toolbar",
    "fieldAttributes" => [
        "task_image" => [
            "data-class" => "table-image-list"
        ],
        "sample_figure" => [
            "data-class" => "table-image-list"
        ],
        "mid" => [
            "data-checkbox" => "true"
        ],
    ]
]);
//操作按钮
echo common\widgets\Toolbar::widget([
    "buttons" => [
        "muiaudit" => [
            "title" => "批量审核",
            "options" => [
                "class" => "muiaudit-Data-Mulit"
            ],
            "icon" => "setting"
        ],
    ]
]);
$this->beginBlock('untreatedaudit');
?>
var p = new Base.tablist();
$(".muiaudit-Data-Mulit").attr("href","javascript:;").bind("click", function (e) {
p.updateMulit({
url: "<?php echo Url::toRoute("muiaudit"); ?>",
message: '<input type="radio" name="complain" value="1" style="display: inline-block;"/>通过 <input type="radio" name="complain" value="2" style="display: inline-block;"/>不通过',
self: $(this)
});
});
<?php $this->endBlock() ?>  
<?php $this->registerJs($this->blocks['untreatedaudit'], \yii\web\View::POS_END); ?>